.class public Les/y00;
.super Ljava/lang/Object;
.source "WifiEnabler.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/y00$b;
    }
.end annotation


# instance fields
.field private a:Landroid/content/Context;

.field private final b:Landroid/net/wifi/WifiManager;

.field private final c:Landroid/content/IntentFilter;

.field private d:Les/y00$b;

.field private final e:Landroid/content/BroadcastReceiver;


# direct methods
.method public constructor <init>(Landroid/content/Context;Les/y00$b;)V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-object v0, p0, Les/y00;->d:Les/y00$b;

    .line 3
    new-instance v0, Les/y00$a;

    invoke-direct {v0, p0}, Les/y00$a;-><init>(Les/y00;)V

    iput-object v0, p0, Les/y00;->e:Landroid/content/BroadcastReceiver;

    .line 4
    iput-object p1, p0, Les/y00;->a:Landroid/content/Context;

    .line 5
    iput-object p2, p0, Les/y00;->d:Les/y00$b;

    const-string p2, "wifi"

    .line 6
    invoke-virtual {p1, p2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/net/wifi/WifiManager;

    iput-object p1, p0, Les/y00;->b:Landroid/net/wifi/WifiManager;

    .line 7
    new-instance p1, Landroid/content/IntentFilter;

    const-string p2, "android.net.wifi.WIFI_STATE_CHANGED"

    invoke-direct {p1, p2}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    iput-object p1, p0, Les/y00;->c:Landroid/content/IntentFilter;

    const-string p2, "android.net.wifi.supplicant.STATE_CHANGE"

    .line 8
    invoke-virtual {p1, p2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 9
    iget-object p1, p0, Les/y00;->c:Landroid/content/IntentFilter;

    const-string p2, "android.net.wifi.STATE_CHANGE"

    invoke-virtual {p1, p2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    return-void
.end method

.method private a(I)V
    .locals 1

    if-eqz p1, :cond_3

    const/4 v0, 0x1

    if-eq p1, v0, :cond_2

    const/4 v0, 0x2

    if-eq p1, v0, :cond_1

    const/4 v0, 0x3

    if-eq p1, v0, :cond_0

    .line 7
    iget-object p1, p0, Les/y00;->d:Les/y00$b;

    const/4 v0, 0x6

    invoke-interface {p1, v0}, Les/y00$b;->c(I)V

    goto :goto_0

    .line 8
    :cond_0
    iget-object p1, p0, Les/y00;->d:Les/y00$b;

    invoke-interface {p1, v0}, Les/y00$b;->c(I)V

    goto :goto_0

    .line 9
    :cond_1
    iget-object p1, p0, Les/y00;->d:Les/y00$b;

    invoke-interface {p1, v0}, Les/y00$b;->c(I)V

    goto :goto_0

    .line 10
    :cond_2
    iget-object p1, p0, Les/y00;->d:Les/y00$b;

    const/4 v0, 0x5

    invoke-interface {p1, v0}, Les/y00$b;->c(I)V

    goto :goto_0

    .line 11
    :cond_3
    iget-object p1, p0, Les/y00;->d:Les/y00$b;

    const/4 v0, 0x4

    invoke-interface {p1, v0}, Les/y00$b;->c(I)V

    :goto_0
    return-void
.end method

.method static synthetic a(Les/y00;I)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Les/y00;->a(I)V

    return-void
.end method


# virtual methods
.method public a()V
    .locals 2

    .line 2
    iget-object v0, p0, Les/y00;->a:Landroid/content/Context;

    iget-object v1, p0, Les/y00;->e:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    return-void
.end method

.method public a(Z)Z
    .locals 1

    .line 3
    :try_start_0
    iget-object v0, p0, Les/y00;->b:Landroid/net/wifi/WifiManager;

    invoke-virtual {v0, p1}, Landroid/net/wifi/WifiManager;->setWifiEnabled(Z)Z

    move-result v0

    if-eqz v0, :cond_1

    if-eqz p1, :cond_0

    .line 4
    iget-object p1, p0, Les/y00;->d:Les/y00$b;

    const/4 v0, 0x1

    invoke-interface {p1, v0}, Les/y00$b;->c(I)V

    goto :goto_0

    .line 5
    :cond_0
    iget-object p1, p0, Les/y00;->d:Les/y00$b;

    const/4 v0, 0x4

    invoke-interface {p1, v0}, Les/y00$b;->c(I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 6
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    :cond_1
    :goto_0
    const/4 p1, 0x0

    return p1
.end method

.method public b()V
    .locals 3

    .line 1
    iget-object v0, p0, Les/y00;->a:Landroid/content/Context;

    iget-object v1, p0, Les/y00;->e:Landroid/content/BroadcastReceiver;

    iget-object v2, p0, Les/y00;->c:Landroid/content/IntentFilter;

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    return-void
.end method
